GCC = g++
CPPFLAGS = -g -finline-functions -Wall -Winline -pipe -DOS_LINUX
HEAD_INFO = -DPROJECT_NAME="\"FASTSEARCH\"" -DDESCRIPTION="\"sse\""
	  
INCLUDES = -I./ -I../../../common/commonlib/output/include \
	   -I../../../common/protobuf/include \
       -I../../../common/sparsehash/include \
	   -I../../../common/sign/ \
	   -I../../../common/zero/include \
	   -I../../../common/termindex \
	   -I../../frame/search_proto/output/include/ \

LIBS     = -L./ -L../../../common/commonlib/output/lib -lcommonlib \
	   -L../../../common/zero/lib -lzmq\
	   -L../../frame/search_proto/output/lib/ -lsearchpb \
	   ../../../common/protobuf/lib/libprotobuf.a \
	   -L../../../common/sign/ -lsign\
	   -lpthread

all : abstract_extracter.a
	mkdir -p output/include
	mkdir -p output/lib
	cp *.h output/include
	cp *.a output/lib

abstract_extracter.a : get_abstract.o
	$(AR) -crv $@ $^
%.o : %.cpp
	$(GCC) $(CPPFLAGS) $(HEAD_INFO) -c $< -o $@ $(INCLUDES)

clean :
	rm -f *.o *.a
	rm -rf output

